﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using ProductManagement.Infrstructre;

namespace ProductManagement.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class CreateClassController : ControllerBase
    {
        public ProductsDbcontext db;

        public CreateClassController(ProductsDbcontext db)
        {
            this.db = db;
        }
        /// <summary>
        /// 创建产品数据库
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public string CreateClassNew()
        {
            db.CreateDatabase();
            return "OK";
        }
    }
}
